package xiangMu.auto.auto02;

public class Car extends Auto {       //轿车类


    public Car() {  ////无参构造方法
    }

    public Car(String type, String brand, String series, String licencePlate, int seatNumber, int dayRent) {
        super(type, brand, series, licencePlate, seatNumber, dayRent);
    }

    @Override
    public double calcRent(int days) {
        double sumRent = getDayRent() * days;
        if (days > 150) {
            sumRent *= 0.7;
        } else if (days > 30) {
            sumRent *= 0.8;
        } else if (days > 7) {
            sumRent *= 0.9;
        }
        return sumRent;
    }
}
